import { BuildPlugin } from "../@types";

export function load() {
    console.debug("tk-inline-html load");
}

export function unload() {
    console.debug("tk-inline-html unload");
}

export const configs: BuildPlugin.Configs = {
    "web-mobile": {
        hooks: "./hooks",
        options: {
            inlineHtml: {
                label: "Inline Html",
                default: true,
                render: {
                    ui: "ui-checkbox",
                }
            },
            isDeflate: {
                label: "开启压缩",
                default: true,
                render: {
                    ui: "ui-checkbox"
                }
            },
            logger: {
                label: "开启埋点",
                default: false,
                render: {
                    ui: "ui-checkbox",
                },
            },
            libs: {
                label: "第三方库",
                type: "object",
                itemConfigs: [
                    {
                        label: "TweenMax",
                        type: "object",
                        default: false,
                        render: {
                            ui: "ui-checkbox",
                        },
                    },
                ],
            },
            comPressInstall: {
                label: "AL/MTG隐藏产品信息",
                default: false,
                render: {
                    ui: "ui-checkbox",
                },
            },
            WZ_autoPackage: {
                label: "网赚产品自动命名打包",
                default: false,
                render: {
                    ui: "ui-checkbox",
                },
            },
            cullingWasm: {
                label: "剔除Wasm",
                default: false,
                render: {
                    ui: "ui-checkbox",
                },
            },
            cullingAsm: {
                label: "剔除Asm",
                default: false,
                render: {
                    ui: "ui-checkbox",
                },
            },
            playableId: {
                label: "Playable Id",
                render: {
                    ui: "ui-input"
                },
            },
            playableName: {
                label: "Playable Name",
                render: {
                    ui: "ui-input"
                },
            },
            scriptPrefix: {
                label: "Script文件名",
                render: {
                    ui: "ui-input",
                    attributes: {
                        placeholder: "支持前缀匹配"
                    }
                }
            },
            loadingPage: {
                label: "加载页",
                render: {
                    ui: "ui-select",
                    attributes: {
                        placeholder: "默认无加载页",
                    },
                    items: [
                        {
                            label: "通用",
                            value: "Common",
                        },
                        {
                            label: "BS",
                            value: "BS",
                        },
                        {
                            label: "WB",
                            value: "WB",
                        },
                        {
                            label: "CS",
                            value: "CS",
                        },
                        {
                            label: "BTA",
                            value: "BTA",
                        }
                    ]
                }
            },
            adPlatform: {
                label: "广告平台",
                render: {
                    ui: "ui-select",
                    items: [
                        {
                            label: "ironsource",
                            value: "ironsource",
                        },
                        {
                            label: "applovin",
                            value: "applovin",
                        },
                        {
                            label: "mintegral",
                            value: "mintegral",
                        },
                        {
                            label: "unity",
                            value: "unity",
                        },
                        {
                            label: "vungle",
                            value: "vungle",
                        },
                        {
                            label: "facebook",
                            value: "facebook",
                        },
                        {
                            label: "moloco",
                            value: "moloco",
                        },
                        {
                            label: "bigo",  //只有common模板回添加引用脚本
                            value: "bigo",
                        },
                        {
                            label: "Inmobi",
                            value: "Inmobi",
                        },
                        {
                            label: "uac",
                            value: "uac",
                        },
                        {
                            label: "tiktok",
                            value: "tiktok",
                        }
                    ],
                },
            },
            iosUrl: {
                label: "Apple Store商店地址",
                render: {
                    ui: "ui-input",
                    attributes: {
                        placeholder: "https://apps.apple.com/us/app/xxxxxxx",
                        value: null
                    },
                },
            },
            androidUrl: {
                label: "Google Play商店地址",
                render: {
                    ui: "ui-input",
                    attributes: {
                        placeholder: "https://play.google.com/store/apps/details?id=xxxxxxx",
                        value: null
                    },
                },
            },
            countryCodes: {
                label: "国家（语言）",
                render: {
                    ui: "ui-textarea",
                    attributes: {
                        placeholder: "默认会解析指定scene下的所有国家码用于编译，按需编译请指定国家码（多个国家码用英文逗号连接）"
                    }
                }
            }
        }
    },
};
